﻿<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">编辑个人信息</h1>
</div>

<div class="wrapper-sm">
    <uib-tabset class="tab-container" ng-init="steps={percent:20, step1:true}">

        <uib-tab heading="个人信息*" ng-show="isauthEdUser" active="steps.step1" select="steps.percent=20">

            <form id="form" name="step1" class="form-validation form-horizontal" novalidate ng-controller="userController">
                <div class="form-group">
                    <label class="col-lg-2 control-label">用户名<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="text" class="form-control input-sm" ng-model="userName" disabled="disabled" placeholder="请填写用户名" name="userName" id="userName">

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">真实姓名<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="text" class="form-control input-sm" ng-model="realName" disabled="disabled" placeholder="请填写用户名" name="realName" id="realName">
                    </div>

                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">所属部门<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="text" class="form-control input-sm" ng-model="department" disabled="disabled" placeholder="用户部门" name="department" id="department">
                    </div>

                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">原密码<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="password" class="form-control input-sm" ng-model="userPassword" placeholder="请填写原密码" required name="userPassword" id="userPassword">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">重置密码<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="password" class="form-control input-sm" ng-minlength="6" ng-model="RuserPassword" placeholder="请填写重置密码" name="RuserPassword" required id="reUserPassword">

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">重复重置密码<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="password" class="form-control input-sm" ng-minlength="6" required ng-model="reUserPassword" placeholder="请再次填写重置密码" name="reUserPassword" ui-validate=" '$value==RuserPassword' " ui-validate-watch=" 'RuserPassword' " ng-change="step1.reUserPassword.$valid ? (steps.percent=20) : (steps.percent=15)"
                            id="reUserPasswordAgain">
                        <span class="text-danger m-l-sm" ng-show='step1.reUserPassword.$error.validator'>重置密码不匹配！</span>
                    </div>
                </div>


                <div class="head-img">

                    <div style="margin-bottom:10px" >
                        <input id="headImgUploader"   name="headImgUploader" type="file" file-read uploader="headImgUploader" ng-disabled="headImgUploader.queue.length>=1" ng-if="headImgUploader.queue.length<1" />
                        <label id="headImgLabel" class="btn btn-success" ng-disabled="headImgUploader.queue.length>=1" for="headImgUploader">选择头像</label>
                    </div>
                    <div   ng-show="!headImgUploader.queue.length"><img width="250" height="250" ng-src="{{headPath}}"></div>
                    <div ng-repeat="item in headImgUploader.queue">
                        
                        <!-- <div &&!item.imgSrc" style="width:250px;max-height:250px;overflow:hidden"  ng-thumb="{ file: item._file, width: 250,path:item.imgSrc  }"></div> -->
                       <img width="250" height="250" ng-src="{{base64}}"/>

                        <div class="btn-area" style="margin-top:10px">
                            <button id="operDetail_driverUpload" type="button" style="margin-right:24px"  ng-hide="item.imgSrc" class="btn btn-default " ng-click="headImgUploader.upload(item)" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                                <span class="glyphicon glyphicon-upload"></span> 上传
                            </button>
                            <button id="operDetail_driverOnDelete" type="button" style="margin-right:12px"  ng-hide="item.imgSrc" class="btn btn-default" ng-click="[headImgUploader.onDelete(item,1)]" ng-show="item.isSuccess || item.isError">
                                <span class="glyphicon glyphicon-trash"></span> 删除
                            </button>
                         
                        </div>
                       
                    </div>

                    
                    
                </div>

             

                <div class="form-group">
                    <div class="m-t m-b col-lg-3">

                        <button class="btn btn-sm btn-default btn-rounded pull-right" ng-click="save()" ng-disabled="!step1.$valid" id="save">保存</button>

                    </div>
                </div>

            </form>


        </uib-tab>

        <uib-tab heading="申领密码" ng-show="isauthNUser" active="steps.step2" select="steps.percent=30">
            <form name="step2" class="form-validation form-horizontal" novalidate ng-controller="applyPassWord">

                <div class="form-group">
                    <label class="col-lg-2 control-label">申领密码<span class="text-danger">*</span></label>
                    <div class="col-md-2">
                        <input type="password" autocomplete="off" ng-pattern="/[1-9]\d*$/" class="form-control input-sm" ng-maxlength="6" ng-minlength="6" id="fa-searchz" ng-model="oldPassword" placeholder="请输入原申领密码" name="oldPassword" required id="oldPassword">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">重置密码<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="password" ng-pattern="/[1-9]\d*$/" class="form-control input-sm" ng-maxlength="6" ng-minlength="6" ng-model="password" placeholder="请填写申领密码" name="password" required id="password">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">重复重置密码<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="password" ng-pattern="/[1-9]\d*$/" class="form-control input-sm" ng-minlength="6" ng-maxlength="6" ng-model="rePassword" name="rePassword" placeholder="请再次填写申领密码" name="reAdminPassword" ui-validate=" '$value==password' " ui-validate-watch=" 'password' "
                            required>
                        <span class="text-danger m-l-sm" ng-show='step2.rePassword.$error.validator'>密码不匹配！</span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="m-t m-b col-lg-3">
                        <button class="btn btn-sm btn-default btn-rounded pull-right" ng-click="passwordSave()" ng-disabled="!step2.$valid" id="passwordSave">保存</button>
                    </div>
                </div>

            </form>
        </uib-tab>


    </uib-tabset>


</div>

<style>
    form{
        position: relative;
    }
    .head-img{
        position: absolute;
        width: 50%;
        right: 0px;
        top:0px;
    }
    #headImgUploader{
        display:none;
    }
    #headImgLabel{
        /* display:inline-block;
        width:50px;
        background-color:#27c24c */
    }

</style>